// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to GNU General Public License v3 license, do not download,
// install, copy or use the software.
//
// OpenPCV is an open source parallel computer vision library.
//
// yang.gao
// 16.08.2009

#if !defined (__PCVDEFS_H__)
#define __PCVDEFS_H__

#define PCV_DLL

#if !defined PCVAPI
	#if defined PCV_DLL
		#define PCVAPI(type, name, arg) extern "C" __declspec(dllexport) type __stdcall name arg
	#else
		#define PCVAPI(type, name, arg) type __stdcall name arg
	#endif
#endif

typedef unsigned char						Pcv8u;
typedef unsigned short						Pcv16u;
typedef unsigned int						Pcv32u;
typedef signed char							Pcv8s;
typedef signed short						Pcv16s;
typedef signed int							Pcv32s;
typedef float								Pcv32f;

typedef struct {
	int						width;
	int						height;
} PcvSize;

typedef struct {
	int						x;
	int						y;
	int						width;
	int						height;
} PcvRect;

typedef enum {

	pcvClsEI								=   0, // Image data exchange and initialization functions
	pcvClsAL								=   1, // Image arithmetic and logical operations
	pcvClsCC								=	2, // Image color conversion
	pcvClsTC								=	3, // Threshold and compare operations
	pcvClsM									=	4, // Morphological operations
	pcvClsF									=	5, // Filtering functions
	pcvClsL									=	6, // Image linear transforms
	pcvClsS									=	7, // Image statistics functions
	pcvClsG									=	8, // Image geometry transforms
	pcvClsW									=	9, // Wavelet transforms
	pcvClsCV								=  10, // Computer vision
	pcvClsC									=  11, // Image compression functions
	pcvClsVC								=  12, // Video Coding
	pcvClsMAX								=  13, // Max class count

}PcvClass;

#define pcvFuncMax						  ( 100 )	// Max function count

typedef enum {

	pcvStsNotBuildErr						=  -7, // Kernel not be build
	pcvStsNoInitErr							=  -5, // Hardware not be initial
	pcvStsInitHardwareErr					=  -4, // Hardware initialize error
	pcvStsSAReservedErr3					=  -3, // Unknown/unspecified error, -3
	pcvStsErr								=  -2, // Unknown/unspecified error, -2
	pcvStsSAReservedErr1					=  -1, // Unknown/unspecified error, -1

	pcvStsNoErr								=   0, // No error, it's OK

}PcvStatus;

#endif // __PCVDEFS_H__
